package pe.com.bn.sach.dao.impl;

import java.util.List;
import com.ibatis.sqlmap.client.SqlMapClient;


import pe.com.bn.sach.domain.Bnchf53CalComprobDomic;
import pe.com.bn.sach.dao.CalComprobDomicDAO;

import org.apache.log4j.Logger;

public class CalComprobDomicImpl  implements CalComprobDomicDAO
{

	private static Logger depurador = Logger.getLogger(CalComprobDomicImpl.class.getName());
	protected SqlMapClient sqlMap = null;
	
	public void setSqlMap(SqlMapClient sqlMap) {
		this.sqlMap = sqlMap;
	}
	

	public int GuardaCalComprobDomic(Bnchf53CalComprobDomic bnchf53CalComprobDomic) 
				throws Exception{	
			int r =0;
    		try{
    			sqlMap.startTransaction();
    			sqlMap.insert("sqlCalComprobDomic53.GuardaCalComprobDomic53",bnchf53CalComprobDomic);
    			sqlMap.commitTransaction();
    			
    			r=1;
    		} catch (Exception e) {
				e.printStackTrace();
				 throw e;
			 } finally {
			    sqlMap.endTransaction();
			}
    	 return r;
    }
	
	public void DeleteCalComprobDomic(Bnchf53CalComprobDomic bnchf53CalComprobDomic) 
	throws Exception{   
				try {
					sqlMap.startTransaction();
					sqlMap.delete("sqlCalComprobDomic53.deletecalComprobDomic",bnchf53CalComprobDomic);
					sqlMap.commitTransaction();
				} catch (Exception e) {
					e.printStackTrace();
					throw e;
				 } finally {
				    sqlMap.endTransaction();
				}


	}
	
	public List ListaCalComprobDomic(Bnchf53CalComprobDomic bnchf53CalComprobDomic) throws Exception{
		return sqlMap.queryForList("sqlCalComprobDomic53.listaComprobDomic",bnchf53CalComprobDomic);
	}
	
	
	
	
}
